import request from '@/utils/request'
// 农资入库
export const AddFarmStockApi = (params) =>
  request.post('/agricultural_purchase/add', params)
// 删除图片接口
export const delpictureApi = (params) =>
  request.post(`/deleteFile?filename=${params}`)
// 农资page查询
export const getFarmsStockPageApi = (params) =>
  request.get(`
/agricultural_inventory/page?current=${params.current}&pageSize=${params.pageSize}&remainingQuantity=${params.remainingQuantity}&type=${params.type}&name=${params.name}`)
// 农资入库记录
export const getFarmsStockPurchasePageApi = (params) =>
  request.get(
    `/agricultural_purchase/page?current=${params.current}&pageSize=${params.pageSize}&startTime=${params.startTime}&endTime=${params.endTime}&type=${params.type}&receiptType=${params.receiptType}`
  )
// 农资出库记录
export const getFarmsStockApplyPageApi = (params) =>
  request.get(
    `/agricultural_apply/page?current=${params.current}&pageSize=${params.pageSize}&startTime${params.startTime}&endTime${params.endTime}&type=${params.type}&farmingType=${params.farmingType}`
  )
